package day2;

public class shuzufanzhuan {
    public static void main(String[] args) {
        int[] array = new int[]{1, 2, 3, 4, 5, 6, 7, 8};
        for (int min = 0, max = array.length - 1; min < max; min++, max--) {
            int i = array[min];
            array[min] = array[max];
            array[max] = i;
        }
        for (int h = 0; h < array.length; h++) {
            System.out.println(array[h]);
        }
    }
}
